# Author: Mr.Xu
# @Time : 2019/12/21 22:23

from rest_framework.serializers import ModelSerializer

from . import models


class BannerModelSerializer(ModelSerializer):
    class Meta:
        model = models.Banner
        fields = ('title', 'link', 'image_url', "info")


class RecommendModelSerializer(ModelSerializer):
    class Meta:
        model = models.Recommend
        fields = [
            "title",
            "score",
            "image_url",
            "heat",
            "order",
            "info",
            "is_free",
            "category_id",
            "video_id",
            "status"
        ]
